import { urlStringify } from 'utils/common/url';

type TLJY_TaskCardUrl = {
  /**
   * @url 网页url
   */
  url: string;
  /**
   * @id 评价id
   */
  id: number | string;
  /**
   * @taskHisId 历史任务id
   */
  taskHisId: number | string;
};

/**
 * @description: 获取氯碱云 任务跳转url
 * @param {TLJY_TaskCardUrl} params
 * @return {*}
 */
export const LJY_TaskCardUrl = (params: TLJY_TaskCardUrl) => {
  const { url, id, taskHisId } = params;
  const payload = {
    evaluationId: id,
    taskHisId: taskHisId,
    platform:"feishu"
  };
  const cUrl = encodeURIComponent(urlStringify(url, payload));
  return cUrl;
};
